function showbigimg(obj, id) {
    var parent = $(obj).parent();
    var index = $('div',parent).index(obj);
    parent.hide();
    
    $('#picb_' + id).show();
    $('#picb_' + id + ' .pic_b li').each(function(i, li) {
        if(i == index) {
            $(li).show();
    		var img = $('.lazyload1',li).get(0);
    		var src = img.getAttribute('original');
    		var scaleType = parseInt(img.getAttribute('scaleType'));
    		var scaleWidth = parseInt(img.getAttribute('scaleWidth'));
    		var scaleHeight = parseInt(img.getAttribute('scaleHeight'));
    		$.ScaleImage(img,src,scaleType,scaleWidth,scaleHeight);
        } else $(li).hide();
    });
    showimgcurrent(index, id);
}

function hidebigimg(id) {
    $('#picb_' + id).hide();
    $('#pic_' + id).show();
}

function showbigimg2(index, id) {
    $('#picb_' + id + ' .pic_b li').each(function(i, li) {
        if(i == index) {
            $(li).show();
    		var img = $('.lazyload1',li).get(0);
    		var src = img.getAttribute('original');
    		var scaleType = parseInt(img.getAttribute('scaleType'));
    		var scaleWidth = parseInt(img.getAttribute('scaleWidth'));
    		var scaleHeight = parseInt(img.getAttribute('scaleHeight'));
    		$.ScaleImage(img,src,scaleType,scaleWidth,scaleHeight);
        } else $(li).hide();
    });
    showimgcurrent(index, id);
}

function showimgcurrent(index, id) {
    $('#picscroll_' + id + ' li a').removeClass('current');
    $('#picscroll_' + id + ' li:eq('+index+') a').addClass('current');
}